package com.ddzh.web;

import com.ddzh.entity.Result;
import com.ddzh.service.SetmealGroupService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/setmealGroupController")
public class SetmealGroupController {

    @Reference
    private SetmealGroupService setmealGroupService;

    @GetMapping("/findBySetmealId/{setmealId}")
    public Result findBySetmealId(@PathVariable("setmealId")Long setmealId){
        if (setmealId>0){
            return new Result(setmealGroupService.findBySetmealId(setmealId));
        }else{
            return new Result(false,"该套餐还没有生成");
        }
    }
}
